package com.ellricky.baselib.ui

import androidx.fragment.app.Fragment
import com.andr.common.ui.activity.BaseToolBarActivity
import com.andr.common.ui.mvp.BasePresenter
import com.andr.common.util.ResUtil
import com.ellricky.baselib.BaseConstant
import com.ellricky.baselib.R
import kotlinx.android.synthetic.main.base_activity_select_introduce.*

class SelectIntroduceActivity : BaseToolBarActivity<Void, BasePresenter<Void>>() {

    private var frgList = arrayListOf<Fragment>()

    override fun getContentLayout(): Int {
        return R.layout.base_activity_select_introduce
    }

    override fun initUIView() {
        super.initUIView()
        mTvTitle.text = "选择介绍人"

        initTab()
    }

    private fun initTab() {
        frgList.add(SelectIntroduceFragment.newInstance(BaseConstant.STU_TYPE_VIP_NEW))
        frgList.add(SelectIntroduceFragment.newInstance(BaseConstant.STU_TYPE_TY))
        val tList = listOf(*ResUtil.getStrArr(this, R.array.base_stu_manage))

        tabLayout.setUp(supportFragmentManager, frgList, tList, vp)
    }
}